package com.lovo.project2.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lovo.project2.bean.SaleDetailsBean;
import com.lovo.project2.mapper.ISaleDetailsBeanMapper;
import com.lovo.project2.service.ISaleDetailsBeanService;

import java.util.List;

public class SaleDetailsBeanServiceImpl extends ServiceImpl<ISaleDetailsBeanMapper, SaleDetailsBean> implements ISaleDetailsBeanService {


    @Override
    public List<SaleDetailsBean> querySaleDetailsBeanListById(int saleId) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("sale_id", saleId);
        return baseMapper.selectList(queryWrapper);
    }

    @Override
    public void addSaleDetailsBean(SaleDetailsBean saleDetailsBean) {
        baseMapper.insert(saleDetailsBean);
    }
}
